
package com.thb.pay.manage.comm.shiro.filter;

import com.thb.pay.manage.comm.enums.LoginTypeEnum;
import com.thb.pay.manage.comm.enums.PlatformTypeEnum;
import org.apache.shiro.authc.UsernamePasswordToken;

import javax.servlet.http.HttpServletRequest;

/**
 * 登入实体类
 */
public class LoginAuthToken extends UsernamePasswordToken {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    private String username;

    private char[] password;

    private boolean rememberMe;

    /**
     * 电话号码
     */
    private String phone;

    private String email;

    /**
     * 验证码
     */
    private String captcha;

    /**
     * 登录类型
     */
    private LoginTypeEnum loginType;

    /**
     * 平台类型
     */
    private PlatformTypeEnum platformType;


    private HttpServletRequest request;


    @Override
    public Object getPrincipal() {
        return getUsername();
    }

    @Override
    public Object getCredentials() {
        return getPassword();
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public char[] getPassword() {
        return password;
    }

    public void setPassword(char[] password) {
        this.password = password;
    }

    public boolean isRememberMe() {
        return rememberMe;
    }

    public void setRememberMe(boolean rememberMe) {
        this.rememberMe = rememberMe;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getCaptcha() {
        return captcha;
    }

    public void setCaptcha(String captcha) {
        this.captcha = captcha;
    }

    public HttpServletRequest getRequest() {
        return request;
    }

    public void setRequest(HttpServletRequest request) {
        this.request = request;
    }


    public LoginTypeEnum getLoginType() {
        return loginType;
    }

    public void setLoginType(LoginTypeEnum loginType) {
        this.loginType = loginType;
    }

    public PlatformTypeEnum getPlatformType() {
        return platformType;
    }

    public void setPlatformType(PlatformTypeEnum platformType) {
        this.platformType = platformType;
    }
}
